package org.edu.controller;

import java.io.Serializable;
import java.util.List;

import javax.annotation.PostConstruct;

import org.edu.model.SemesterNotes;
import org.edu.service.SemesterNotesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class SemesterNotesController implements Serializable {

	private static final long serialVersionUID = 1L;
	@Autowired
	private transient SemesterNotesService semesterNotesService;
	private SemesterNotes semesterNotes;
	private List<SemesterNotes> semesterNotesList;

	public SemesterNotesController() {
		semesterNotes = new SemesterNotes();
	}

	@PostConstruct
	public void init() {
		semesterNotesList = semesterNotesService.semesterNotes();
	}

	public SemesterNotes getSemesterNotes() {
		if(semesterNotes == null){
			semesterNotes = new SemesterNotes();
		}
		return semesterNotes;
	}

	public void setSemesterNotes(SemesterNotes semesterNotes) {
		this.semesterNotes = semesterNotes;
	}

	public List<SemesterNotes> getSemesterNotesList() {
		return semesterNotesList;
	}

}
